package com.wowkids.controller;

import com.wowkids.dao.UserPo;
import com.wowkids.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/demo")
public class DemoController {

    @Resource
    private UserService userService;

    @GetMapping("/getDemo")
    public List<UserPo> getDemo(){
        return userService.getAll();
    }

    @PostMapping("postDemo")
    public String postDemo(){
        return "postDemo";
    }

}
